{% extends "base.html" %}
{% block title %}Setup tokens and secrets for Storage and Prediction{% endblock %}
{% block head %}
{% endblock %}
{% block body %}
<h1>Setup tokens and secrets for Storage and Prediction</h1>
	<p>Get these from the <a href="https://code.google.com/apis/console/">Google API Console</a>: create a project for your deployment of this App with Storage and Prediction Services turned on, and set your callback url to http://&lt;your-app-id&gt;.appspot.com/oauth2callback</p>
	<p>
        <form name="auth" action="/admin/config" method="post">
            Google OAuth2 Client Id: <input type="text" name="CLIENT_ID" value="{{ model.client_id}}"/><br/>
            Google OAuth2 Client Secret: <input type="password" name="CLIENT_SECRET" value="{{ model.client_secret}}"/><br/>
            Google OAuth2 Storage Project Id: <input type="text" name="STORAGE_PROJECT_ID" value="{{ model.storage_project_id}}"/><br/>
            Bucket Name: <input type="text" name="BUCKET_NAME" value="{{ model.bucket_name}}"/><br/>
            OAuth Access Token: {{ model.credentials.access_token }}<br/>
        <input type="submit" value="Submit" />
        </form>	
    </p>
    <a href="/admin/oauth">Reset OAuth Credentials</a>
{% endblock %}
